/*
 * @Descripttion: 文件说明
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2022-01-15 11:28:23
 */
import { axios } from "../../utils/request";

//报表方案
const api = {
    save: "/erp/reportProgramme/save",
    delete: "/erp/reportProgramme/delete",


    myplan: "/erp/reportProgramme/list",  //查询个人报表方案
    systemplan: "/erp/reportProgramme/getSystemReportProgramme",  //查询系统报表方案

    details: "/erp/reportDesign/pageReport",//动态分页查询列表

    exportUrl: "/erp/reportDesign/exportReport",//导出明细
}
/**
 * 查询个人报表方案
 */
export function myplan (parameter) {
    return axios({
        url: api.myplan,
        method: "get",
        params: parameter
    });
}


/**
 * 查询系统报表方案
 */
export function systemplan (parameter) {
    return axios({
        url: api.systemplan,
        method: "get",
        params: parameter
    });
}

/**
 * 保存
 */
export function save (parameter) {
    return axios({
        url: api.save,
        method: "post",
        data: parameter
    });
}

/**
 * 删除
 */
export function remove (parameter) {
    return axios({
        url: api.delete,
        method: "delete",
        params: parameter
    });
}


/**
 * 动态分页查询明细
 */
export function detailsList (parameter) {
    return axios({
        url: api.details,
        method: "post",
        data: parameter
    });
}

//导出报表
export function exportTable (parameter) {
    return axios({
        url: api.exportUrl,
        method: "post",
        data: parameter,
        responseType: 'blob'
    });
}
